package com.ado.bazinga.core.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ado.bazinga.core.dal.dao.GoodMapper;
import com.ado.bazinga.core.dal.entity.Good;
import com.ado.bazinga.core.manager.GoodManager;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 *@author adonais
 *@date 2020年3月20日
 *@description GoodManagerImpl.java
**/
@Service(value = "goodManager")
public class GoodManagerImpl extends ServiceImpl<GoodMapper, Good> implements GoodManager{

	@Autowired
	private GoodMapper goodMapper ;
	
	@Override
	public Integer countSoldNum() {
		Integer soldNum = goodMapper.countSoldNum() ;
		return soldNum;
	}

	@Override
	public Integer countStockNum() {
		Integer stockNum = goodMapper.countStockNum() ;
		return stockNum;
	}

	@Override
	public List<Good> findGoodsByType(String type) {
		return goodMapper.findGoodsByType(type);
	}

}
